package java02;

import java.util.ArrayList;

public class java02_9 {
    public static void main(String[] args) {
        int[] arr={1,2,3,4,5,6,7,8,9};
int x=2;
int y=5;
getCopy(arr,x,y);
    }
    public static void getCopy(int[] arr,int x, int y)
    {
        int c=0;
        int[] b=new int[y-x];
        for(int i=x;i<y;i++)
        {
           b[c]=arr[i];
           c++;
        }
        for(int i=0;i<b.length;i++){
            System.out.print(b[i]);
        }
    }
}
